package com.csproj.dispatch.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;


/**
 * 货物基本信息表
 */
@ApiModel(description = "货物基本信息表")
@Entity
@Table(name = "t_dis_product_info")
public class ProductInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "id")
    private String id;

    /**
     * 海关编号
     */
    @ApiModelProperty(value = "海关编号")
    @Column(name = "custom_code")
    private String customCode;

    /**
     * 集装箱主键
     */
    @ApiModelProperty(value = "集装箱主键")
    @Column(name = "container_id")
    private String containerId;

    /**
     * 集装箱编号
     */
    @ApiModelProperty(value = "集装箱编号")
    @Column(name = "container_code")
    private String containerCode;

    /**
     * 清关代理
     */
    @ApiModelProperty(value = "清关代理")
    @Column(name = "despachante")
    private String despachante;

    /**
     * 件数
     */
    @ApiModelProperty(value = "件数")
    @Column(name = "ctn")
    private Integer ctn;

    /**
     * 包装种类
     */
    @ApiModelProperty(value = "包装种类")
    @Column(name = "packagekind")
    private String packagekind;

    /**
     * 唯一申报
     */
    @ApiModelProperty(value = "唯一申报")
    @Column(name = "du")
    private String du;

    /**
     * 毛重
     */
    @ApiModelProperty(value = "毛重")
    @Column(name = "pesobruto")
    private Double pesobruto;

    /**
     * 净重
     */
    @ApiModelProperty(value = "净重")
    @Column(name = "pesoquido")
    private Double pesoquido;

    /**
     * 海关人员检验结果
     */
    @ApiModelProperty(value = "海关人员检验结果")
    @Column(name = "rdia")
    private String rdia;

    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志")
    @Column(name = "deleted_flag")
    private Boolean deletedFlag;

    /**
     * 删除人
     */
    @ApiModelProperty(value = "删除人")
    @Column(name = "deleter_user_id")
    private String deleterUserId;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @Column(name = "deletion_time")
    private ZonedDateTime deletionTime;

    /**
     * 最近更新时间
     */
    @ApiModelProperty(value = "最近更新时间")
    @Column(name = "last_modification_time")
    private ZonedDateTime lastModificationTime;

    /**
     * 最近更新人
     */
    @ApiModelProperty(value = "最近更新人")
    @Column(name = "last_modifier_user_id")
    private String lastModifierUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "creation_time")
    private ZonedDateTime creationTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Column(name = "creator_user_id")
    private String creatorUserId;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCustomCode() {
        return customCode;
    }

    public ProductInfo customCode(String customCode) {
        this.customCode = customCode;
        return this;
    }

    public void setCustomCode(String customCode) {
        this.customCode = customCode;
    }

    public String getContainerId() {
        return containerId;
    }

    public ProductInfo containerId(String containerId) {
        this.containerId = containerId;
        return this;
    }

    public void setContainerId(String containerId) {
        this.containerId = containerId;
    }

    public String getContainerCode() {
        return containerCode;
    }

    public ProductInfo containerCode(String containerCode) {
        this.containerCode = containerCode;
        return this;
    }

    public void setContainerCode(String containerCode) {
        this.containerCode = containerCode;
    }

    public String getDespachante() {
        return despachante;
    }

    public ProductInfo despachante(String despachante) {
        this.despachante = despachante;
        return this;
    }

    public void setDespachante(String despachante) {
        this.despachante = despachante;
    }

    public Integer getCtn() {
        return ctn;
    }

    public ProductInfo ctn(Integer ctn) {
        this.ctn = ctn;
        return this;
    }

    public void setCtn(Integer ctn) {
        this.ctn = ctn;
    }

    public String getPackagekind() {
        return packagekind;
    }

    public ProductInfo packagekind(String packagekind) {
        this.packagekind = packagekind;
        return this;
    }

    public void setPackagekind(String packagekind) {
        this.packagekind = packagekind;
    }

    public String getDu() {
        return du;
    }

    public ProductInfo du(String du) {
        this.du = du;
        return this;
    }

    public void setDu(String du) {
        this.du = du;
    }

    public Double getPesobruto() {
        return pesobruto;
    }

    public ProductInfo pesobruto(Double pesobruto) {
        this.pesobruto = pesobruto;
        return this;
    }

    public void setPesobruto(Double pesobruto) {
        this.pesobruto = pesobruto;
    }

    public Double getPesoquido() {
        return pesoquido;
    }

    public ProductInfo pesoquido(Double pesoquido) {
        this.pesoquido = pesoquido;
        return this;
    }

    public void setPesoquido(Double pesoquido) {
        this.pesoquido = pesoquido;
    }

    public String getRdia() {
        return rdia;
    }

    public ProductInfo rdia(String rdia) {
        this.rdia = rdia;
        return this;
    }

    public void setRdia(String rdia) {
        this.rdia = rdia;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public ProductInfo deletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
        return this;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public ProductInfo deleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
        return this;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public ProductInfo deletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
        return this;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public ProductInfo lastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
        return this;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public ProductInfo lastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
        return this;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public ProductInfo creationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public ProductInfo creatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
        return this;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ProductInfo productInfo = (ProductInfo) o;
        if (productInfo.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), productInfo.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "ProductInfo{" +
            "id=" + getId() +
            ", customCode='" + getCustomCode() + "'" +
            ", containerCode='" + getContainerCode() + "'" +
            ", despachante='" + getDespachante() + "'" +
            ", ctn=" + getCtn() +
            ", packagekind='" + getPackagekind() + "'" +
            ", du='" + getDu() + "'" +
            ", pesobruto=" + getPesobruto() +
            ", pesoquido=" + getPesoquido() +
            ", rdia='" + getRdia() + "'" +
            ", deletedFlag='" + isDeletedFlag() + "'" +
            ", deleterUserId='" + getDeleterUserId() + "'" +
            ", deletionTime='" + getDeletionTime() + "'" +
            ", lastModificationTime='" + getLastModificationTime() + "'" +
            ", lastModifierUserId='" + getLastModifierUserId() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }
}
